/*
 * ValueChangedMonitorDescription.java
 * 
 * last update: 16.01.2010 by Stefan Saru
 * 
 * author:	Alec(panovici@elcom.pub.ro)
 * 
 * Obs:
 */
package engine;

@SuppressWarnings("serial")
class ValueChangeMonitorDescription extends MonitorDescription{

	int mask;

	ValueChangeMonitorDescription(NameSpaceDescription nsd, 
			ExpressionDescription target,int mask){
		super(nsd, target);
		this.mask = mask;
	}

	Monitor instantiate(NameSpace ns)throws ParseException{
		return new ValueChangeMonitor(ns, target.instantiate(ns), mask);
	}

	public String toString(){
		String result = " ";
		if((mask & ValueChangeMonitor.EVT_POSEDGE) != 0) result = "posedge ";
		else if((mask & ValueChangeMonitor.EVT_NEGEDGE) != 0) result = "negedge ";
		result += target;
		return result;
	}
}










